<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" session="true"%>
<%@page import="com.sinopec.siam.agent.common.SSOPrincipal"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Welcome, <%=session.getAttribute(SSOPrincipal.NAME_OF_SESSION_ATTR)%></title>
</head>
<body>
	Welcome ,
	<%=((SSOPrincipal) session.getAttribute(SSOPrincipal.NAME_OF_SESSION_ATTR)).getUid()%>
	[<%=((SSOPrincipal) session.getAttribute(SSOPrincipal.NAME_OF_SESSION_ATTR)).getLastAuthenMethod()%>]!
	<br />
	<br />
	<%
	  SSOPrincipal ssoPrincipal = ((SSOPrincipal) session.getAttribute(SSOPrincipal.NAME_OF_SESSION_ATTR));
		  out.print("\n统一ID：" + ssoPrincipal.getUid());
	%>
	<br />用户姓名：
	<%=ssoPrincipal.getCn()%>
	<br />当前认证方法：<%=ssoPrincipal.getLastAuthenMethod()%>
	<br />用户属性：
	<%
	Iterator ite = ssoPrincipal.getAttributeNames().iterator();
	while(ite.hasNext()){
		String attribute = (String)ite.next();
	%>
	<br />
	<%
  out.print(attribute + "=" + ssoPrincipal.getValueAsList(attribute));
	  }
	%>
	<br />
	<br />
	<h3>
	 
		<a href="./SSO/SLO/Redirect">Logout</a>
		<br />
		<br />
		<a href="./SSO/GLO/Redirect">Global Logout</a>
	</h3>
</body>
</html>